<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <style type="text/css">
        body {
            font: normal 12px Arial;
            margin: 10px;
            padding: 0px;
        }

        select, input, textarea {
            font: normal 13px Arial;
        }

        form {
            margin: 0px;
            padding: 0px;
        }

        table {
            font: normal 12px Arial;
        }

        img {
            border: none;
        }

        a {
            color: #0000FF;
        }

        hr {
            color: #C3D5EE;
        }

        p {
            padding: 0;
            margin: 0;
        }

        .errlist li {
            font: bold 12px Arial;
            color: #C22222;
        }

        .menu li {
            border: solid 1px #C3D5EE;
            background: #E8EEFA;
            padding: 2px 5px;
            margin-right: 5px;
            font-weight: bold;
            float: left;
        }

        .submenu li {
            border: solid 1px #C3D5EE;
            background: #E8EEFA;
            padding: 2px 5px;
            font: normal 11px Arial;
            float: left;
        }

        .formtable th {
            background: #C3D5EE;
            font-weight: bold;
        }

        .formtable td {
            background: #E8EEFA;
        }

        .formtable2 th {
            background: #C3D5EE;
            font-weight: bold;
        }

        .formtable2 td {
            background: #E8EEFA;
            color: #E8EEFA
        }

        .scheduletable th {
            background: #C3D5EE;
            font-weight: bold;
        }

        .scheduletable th .r {
            border-bottom: solid 2px #ff0000;
        }

        .scheduletable td {
            background: #E8EEFA;
            border: solid 1px #C3D5EE;
            text-align: center;
        }

        .scheduletable .tb {
            border-top: solid 1px #0000ff;
        }

        .scheduletable .lb {
            border-left: solid 1px #0000ff;
        }

        .miniedit th {
            background: #C3D5EE;
            font: bold 11px Arial;
        }

        .miniedit td {
            background: #E8EEFA;
        }

        .grid th {
            padding: 5px;
            background: #C3D5EE;
            font-weight: bold;
        }

        .grid td {
            padding: 5px;
            background: #fff;
            font: normal 12px Arial;
            border-bottom: solid 1px #C3D5EE;
        }

        .table th {
            border: solid 1px #C3D5EE;
            background: #E8EEFA;
            font: bold 12px Arial;
        }

        .table td {
            border: solid 1px #C3D5EE;
        }

        .regform td, th {
            font: normal 12px Arial;
            padding: 5px;
        }

        .regform th {
            text-align: right;
        }

        .regform td {
            text-align: left;
        }
    </style>
</head>
<body>
<div>
    <table id="tbl" class="scheduletable" width="7525" cellspacing="0" cellpadding="2">
        <tr>
            <th></th>
            {% for group_name in group_names %}
                <th colspan="2">
                    {{ group_name }}
                </th>
            {% endfor %}
        </tr>
        {% for day in schedule %}
            {% for position in day %}
                <tr>
                    {% if forloop.first %}
                        <th rowspan="10">{{ forloop.parentloop.counter }}</th>
                    {% endif %}
                    {% for lesson in position %}
                        <td class="tb lb"
                            colspan="{% if lesson.common == 0 %} 2 {% endif %}{% if lesson.common == 1 %} 1 {% endif %}{% if lesson.common == 2 %} 1 {% endif %}"
                            rowspan="{% if lesson.even == 0 %} 2 {% endif %}{% if lesson.even == 1 %} 1 {% endif %}{% if lesson.even == 2 %} 1 {% endif %}">
                            {{ lesson.subject.name }}
                        </td>
                    {% endfor %}
                </tr>
            {% endfor %}
        {% endfor %}
    </table>
</div>
</body>
</html>